﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Mocola.BLL;
using Mocola.Model;
using System.Text;

namespace Mocola.Net.Web.ajax
{
    public partial class Export_Excel : System.Web.UI.Page
    {
         
        /* BEGIN: [#7]*/
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                Export2Excel();
        }
        /// <summary>
        /// 导出图纸与文件
        /// </summary>
        private void Export2Excel()
        {
            string Eid = Request.QueryString["eid"];
            string Tid =Request.QueryString["tid"];
            string P = Request.QueryString["p"];
            Response.Clear();
            Response.Buffer = true;
            Response.Charset = "gb2312";
            Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");           
            Response.ContentType = "Application/ms-excel";           
            switch(P)
            {
                case "0":
                    /*Begin:[#24]*/
                    #region
                    Response.AppendHeader("content-disposition", "attachment;filename=\"" + System.Web.HttpUtility.UrlEncode("项目类图纸列表", System.Text.Encoding.UTF8) + ".xls\"");
                  using (DataSet dsPic = Databases.MocolaNet.Select(Moc_MapsInfo.Moc_Maps,
                  Moc_MapsInfo.Moc_Maps.ID,
                  Moc_MapsInfo.Moc_Maps.Name,
                  Moc_MapsInfo.Moc_Maps.JueDingHao,
                  Moc_MapsInfo.Moc_Maps.TuZhiBianHao,
                  Moc_MapsInfo.Moc_Maps.ZhuanYeLeiBie,
                  Moc_MapsInfo.Moc_Maps.ChuTuRiQi,
                  Moc_MapsInfo.Moc_Maps.SheJiDanWei,
                  Moc_MapsInfo.Moc_Maps.BanBen,
                  Moc_MapsInfo.Moc_Maps.TuFu,
                  Moc_MapsInfo.Moc_Maps.Zhang,
                  Moc_MapsInfo.Moc_Maps.Tao,
                  Moc_MapsInfo.Moc_Maps.ShuLiang,
                  Moc_MapsInfo.Moc_Maps.ZaiTi,
                  Moc_MapsInfo.Moc_Maps.CaiZhi,
                  Moc_MapsInfo.Moc_Maps.MiJi,
                  Moc_MapsInfo.Moc_Maps.BaoGuanQiXian,
                  Moc_MapsInfo.Moc_Maps.ZhuangTai,
                  Moc_MapsInfo.Moc_Maps.FaQiBuMen,
                  Moc_MapsInfo.Moc_Maps.YiJiaoRen,
                  Moc_MapsInfo.Moc_Maps.JiShouRen,
                  Moc_MapsInfo.Moc_Maps.JiShouRiQi,
                  Moc_MapsInfo.Moc_Maps.BeiZhu)
                  .Where((Moc_MapsInfo.Moc_Maps.Tid == Tid) && (Moc_MapsInfo.Moc_Maps.Eid == Eid))
                  .ToDataSet())
                    {
                        StringBuilder sb=new StringBuilder ();
                        sb.Append ("名称\t");
                        sb.Append ("决定号\t");
                         sb.Append ("图纸编号\t");
                         sb.Append ("专业类别\t");
                         sb.Append ("出图日期\t");
                         sb.Append ("设计单位\t");
                         sb.Append ("版本\t");
                         sb.Append ("图幅\t");
                         sb.Append ("张/套\t");
                         sb.Append ("数量\t");
                         sb.Append ("载体\t");
                         sb.Append ("材质\t");
                         sb.Append ("密级\t");
                         sb.Append ("保管期限\t");
                         sb.Append ("状态\t");
                         sb.Append ("发起部门\t");
                         sb.Append ("移交人\t");
                         sb.Append ("接受人\t");
                         sb.Append ("接受日期\t");
                        sb.Append ("备注\t");
                        sb.Append("\n");
                        Response.Write(sb.ToString());
                        foreach (DataRow row in dsPic.Tables[0].Rows)
                        {
                            sb = new StringBuilder();
                            sb.Append(row["Name"].ToString() + "\t");
                            sb.Append(row["JueDingHao"].ToString() + "\t");
                            sb.Append(row["TuZhiBianHao"].ToString() + "\t");
                            sb.Append(row["ZhuanYeLeiBie"].ToString() + "\t");
                            sb.Append(row["ChuTuRiQi"].ToString() + "\t");
                            sb.Append(row["SheJiDanWei"].ToString() + "\t");
                            sb.Append(row["BanBen"].ToString() + "\t");
                            sb.Append("A"+row["TuFu"].ToString() + "\t");
                            sb.Append(row["Zhang"].ToString() + "张/套,共" + row["Tao"].ToString() + "套\t");
                            sb.Append(row["ShuLiang"].ToString() + "\t");
                            string zaiti=row["ZaiTi"].ToString ().Trim();
                            zaiti=zaiti=="0" ? "纸质" : (zaiti== "1" ? "电子档" :zaiti == "2" ? "光盘" : "-");
                            sb.Append(zaiti+ "\t");
                            string caizhi = row["CaiZhi"].ToString().Trim();
                            caizhi = caizhi == "0" ? "无" : (caizhi== "1" ? "蓝图" : (caizhi == "2" ? "白图" : "-"));
                            sb.Append(caizhi + "\t");
                            string miji = row["MiJi"].ToString();
                            miji = miji == "0" ? "公开" : (miji == "1" ? "限制" : (miji == "2" ? "秘密" : "-")); 
                            sb.Append(miji+ "\t");
                            string BaoGuanQiXian = row["BaoGuanQiXian"].ToString().Trim();
                            BaoGuanQiXian=BaoGuanQiXian== "0" ? "永久" : (BaoGuanQiXian== "1" ? "长期" : (BaoGuanQiXian == "2" ? "短期" : "-"));
                            sb.Append(BaoGuanQiXian+ "\t");
                            string zhuangtai = row["ZhuangTai"].ToString();
                            zhuangtai=zhuangtai== "0" ? "无效" : "有效";
                            sb.Append(zhuangtai+ "\t");
                            sb.Append(row["FaQiBuMen"].ToString() + "\t");
                            sb.Append(row["YiJiaoRen"].ToString() + "\t");
                            sb.Append(row["JiShouRen"].ToString() + "\t");
                            sb.Append(row["JiShouRiQi"].ToString() + "\t");
                            sb.Append(row["BeiZhu"].ToString() + "\t");
                            sb.Append("\n");
                            Response.Write(sb.ToString());
                        }                   
                    }
                    #endregion
                  /*End:[#24]*/
                    break;
                case "1":
                    #region
                    Response.AppendHeader("content-disposition", "attachment;filename=\"" + System.Web.HttpUtility.UrlEncode("项目类文件列表", System.Text.Encoding.UTF8) + ".xls\"");
                    using (DataSet dsFile = Databases.MocolaNet.Select(Moc_FilesInfo.Moc_Files,
                   Moc_FilesInfo.Moc_Files.ID,
                   Moc_FilesInfo.Moc_Files.Name,
                   Moc_FilesInfo.Moc_Files.JueDingHao,
                   Moc_FilesInfo.Moc_Files.WenJianHao,
                   Moc_FilesInfo.Moc_Files.ShenQingHao,
                   Moc_FilesInfo.Moc_Files.FaWenDanWei,
                   Moc_FilesInfo.Moc_Files.FaWenRiQi,
                   Moc_FilesInfo.Moc_Files.ShuLiang,
                   Moc_FilesInfo.Moc_Files.ZaiTi,
                   Moc_FilesInfo.Moc_Files.CaiZhi,
                   Moc_FilesInfo.Moc_Files.MiJi,
                   Moc_FilesInfo.Moc_Files.BaoGuanQiXian,
                   Moc_FilesInfo.Moc_Files.ZhuangTai,
                   Moc_FilesInfo.Moc_Files.FaQiBuMen,
                   Moc_FilesInfo.Moc_Files.YiJiaoRen,
                   Moc_FilesInfo.Moc_Files.JieShouRen,
                   Moc_FilesInfo.Moc_Files.JieShouRiQi,
                   Moc_FilesInfo.Moc_Files.BeiZhu)
                   .Where((Moc_FilesInfo.Moc_Files.Tid == Tid) && (Moc_FilesInfo.Moc_Files.Eid == Eid))
                   .ToDataSet())
                    {
                        StringBuilder sb = new StringBuilder();
                        sb.Append("名称\t");
                        sb.Append("文件号\t");
                        sb.Append("申请号\t");
                        sb.Append("决定号\t");
                        sb.Append("发文日期\t");
                        sb.Append("发文单位\t");
                        sb.Append("数量\t");                       
                        sb.Append("载体\t");
                        sb.Append("材质\t");
                        sb.Append("密级\t");
                        sb.Append("保管期限\t");
                        sb.Append("状态\t");
                        sb.Append("发起部门\t");
                        sb.Append("移交人\t");
                        sb.Append("接受人\t");
                        sb.Append("接受日期\t");
                        sb.Append("备注\t");
                        sb.Append("\n");
                        Response.Write(sb.ToString());
                        foreach (DataRow row in dsFile.Tables[0].Rows)
                        {
                            sb = new StringBuilder();
                            sb.Append(row["Name"].ToString() + "\t");
                            sb.Append(row["WenJianHao"].ToString() + "\t");
                            sb.Append(row["ShenQingHao"].ToString() + "\t");
                            sb.Append(row["JueDingHao"].ToString() + "\t");
                            sb.Append(row["FaWenRiQi"].ToString() + "\t");
                            sb.Append(row["FaWenDanWei"].ToString() + "\t");
                            sb.Append(row["ShuLiang"].ToString() + "\t");
                            string zaiti = row["ZaiTi"].ToString().Trim();
                            zaiti = zaiti == "0" ? "纸质" : (zaiti == "1" ? "电子档" : zaiti == "2" ? "光盘" : "-");
                            sb.Append(zaiti + "\t");
                            string caizhi = row["CaiZhi"].ToString();
                            caizhi=caizhi== "0" ? "文档" : (caizhi == "1" ? "照片" : (caizhi== "2" ? "照证" : (caizhi== "3" ? "图片" : "-")));
                            sb.Append(caizhi+ "\t");
                            string miji=row["MiJi"].ToString();
                            miji=miji== "0" ? "公开" : (miji== "1" ? "限制" : (miji == "2" ? "秘密" : "-"));
                            sb.Append(miji+ "\t");
                             string BaoGuanQiXian = row["BaoGuanQiXian"].ToString().Trim();
                            BaoGuanQiXian=BaoGuanQiXian== "0" ? "永久" : (BaoGuanQiXian== "1" ? "长期" : (BaoGuanQiXian == "2" ? "短期" : "-"));
                            sb.Append(BaoGuanQiXian+ "\t");
                            string zhuangtai = row["ZhuangTai"].ToString();
                            zhuangtai=zhuangtai== "0" ? "原件" : (zhuangtai== "1" ? "复印件" : (zhuangtai== "2" ? "电子档" : "-"));
                            sb.Append(zhuangtai+ "\t");
                            sb.Append(row["FaQiBuMen"].ToString() + "\t");
                            sb.Append(row["YiJiaoRen"].ToString() + "\t");
                            sb.Append(row["JieShouRen"].ToString() + "\t");
                            sb.Append(row["JieShouRiQi"].ToString() + "\t");
                            sb.Append(row["BeiZhu"].ToString() + "\t");
                            sb.Append("\n");
                            Response.Write(sb.ToString ());
                        }                    
                    }
                    #endregion
                    break;
                case "2":
                    #region
                    Response.AppendHeader("content-disposition", "attachment;filename=\"" + System.Web.HttpUtility.UrlEncode("管理类外来文件列表", System.Text.Encoding.UTF8) + ".xls\"");
                    using (DataSet dsFile = Databases.MocolaNet.Select(Moc_OutFilesInfo.Moc_OutFiles,
                    Moc_OutFilesInfo.Moc_OutFiles.Name,
                    Moc_OutFilesInfo.Moc_OutFiles.WenJianHao,
                    Moc_OutFilesInfo.Moc_OutFiles.FaWenRiQi,
                    Moc_OutFilesInfo.Moc_OutFiles.FaWenJiGuan,
                    Moc_OutFilesInfo.Moc_OutFiles.JieShouRiQi,
                    Moc_OutFilesInfo.Moc_OutFiles.BaoCunQiXian,
                    Moc_OutFilesInfo.Moc_OutFiles.CunDangHao,
                    Moc_OutFilesInfo.Moc_OutFiles.ZhuangTai,
                    Moc_OutFilesInfo.Moc_OutFiles.BeiZhu)
                   .Where((Moc_OutFilesInfo.Moc_OutFiles.Tid == Tid) && (Moc_OutFilesInfo.Moc_OutFiles.Eid == Eid))
                   .ToDataSet())
                    {

                        StringBuilder sb = new StringBuilder();
                        sb.Append("名称\t");
                        sb.Append("文件号\t");
                        sb.Append("发文日期\t");
                        sb.Append("发文机关\t");
                        sb.Append("接收日期\t");
                        sb.Append("保存期限\t");
                        sb.Append("存档号\t");
                        sb.Append("状态\t");
                        sb.Append("备注\t");
                        sb.Append("\n");
                        Response.Write(sb.ToString());
                        foreach (DataRow row in dsFile.Tables[0].Rows)
                        {
                            sb = new StringBuilder();
                            sb.Append(row["Name"].ToString() + "\t");
                            sb.Append(row["WenJianHao"].ToString() + "\t");
                            sb.Append(row["FaWenRiQi"].ToString() + "\t");
                            sb.Append(row["FaWenJiGuan"].ToString() + "\t");
                            sb.Append(row["JieShouRiQi"].ToString() + "\t");
                            string BaoGuanQiXian = row["BaoCunQiXian"].ToString().Trim();
                            BaoGuanQiXian = BaoGuanQiXian == "0" ? "永久" : (BaoGuanQiXian == "1" ? "长期" : (BaoGuanQiXian == "2" ? "短期" : "-"));
                            sb.Append(BaoGuanQiXian + "\t");
                            sb.Append(row["CunDangHao"].ToString() + "\t");
                            string zhuangtai = row["ZhuangTai"].ToString();
                            zhuangtai = zhuangtai == "0" ? "原件" : (zhuangtai == "1" ? "复印件" : (zhuangtai == "2" ? "电子档" : "-"));
                            sb.Append(zhuangtai + "\t");
                            sb.Append(row["BeiZhu"].ToString() + "\t");
                            sb.Append("\n");
                            Response.Write(sb.ToString());
                        }
                    }
                    #endregion
                    break;
                case "3":
                    /*Begin:[#24]*/
                    #region
                    Response.AppendHeader("content-disposition", "attachment;filename=\"" + System.Web.HttpUtility.UrlEncode("管理类图纸列表", System.Text.Encoding.UTF8) + ".xls\"");
                    using (DataSet dsPic = Databases.MocolaNet.Select(Moc_MMapsInfo.Moc_MMaps,
                    Moc_MMapsInfo.Moc_MMaps.ID,
                    Moc_MMapsInfo.Moc_MMaps.Name,
                    Moc_MMapsInfo.Moc_MMaps.JueDingHao,
                    Moc_MMapsInfo.Moc_MMaps.TuZhiBianHao,
                    Moc_MMapsInfo.Moc_MMaps.ZhuanYeLeiBie,
                    Moc_MMapsInfo.Moc_MMaps.ChuTuRiQi,
                    Moc_MMapsInfo.Moc_MMaps.SheJiDanWei,
                    Moc_MMapsInfo.Moc_MMaps.BanBen,
                    Moc_MMapsInfo.Moc_MMaps.TuFu,
                    Moc_MMapsInfo.Moc_MMaps.Zhang,
                    Moc_MMapsInfo.Moc_MMaps.Tao,
                    Moc_MMapsInfo.Moc_MMaps.ShuLiang,
                    Moc_MMapsInfo.Moc_MMaps.ZaiTi,
                    Moc_MMapsInfo.Moc_MMaps.CaiZhi,
                    Moc_MMapsInfo.Moc_MMaps.MiJi,
                    Moc_MMapsInfo.Moc_MMaps.BaoGuanQiXian,
                    Moc_MMapsInfo.Moc_MMaps.ZhuangTai,
                    Moc_MMapsInfo.Moc_MMaps.FaQiBuMen,
                    Moc_MMapsInfo.Moc_MMaps.YiJiaoRen,
                    Moc_MMapsInfo.Moc_MMaps.JiShouRen,
                    Moc_MMapsInfo.Moc_MMaps.JiShouRiQi,
                    Moc_MMapsInfo.Moc_MMaps.BeiZhu)
                    .Where((Moc_MMapsInfo.Moc_MMaps.Tid == Tid) && (Moc_MMapsInfo.Moc_MMaps.Eid == Eid))
                    .ToDataSet())
                    {
                        StringBuilder sb = new StringBuilder();
                        sb.Append("名称\t");
                        sb.Append("决定号\t");
                        sb.Append("图纸编号\t");
                        sb.Append("专业类别\t");
                        sb.Append("出图日期\t");
                        sb.Append("设计单位\t");
                        sb.Append("版本\t");
                        sb.Append("图幅\t");
                        sb.Append("张/套\t");
                        sb.Append("数量\t");
                        sb.Append("载体\t");
                        sb.Append("材质\t");
                        sb.Append("密级\t");
                        sb.Append("保管期限\t");
                        sb.Append("状态\t");
                        sb.Append("发起部门\t");
                        sb.Append("移交人\t");
                        sb.Append("接受人\t");
                        sb.Append("接受日期\t");
                        sb.Append("备注\t");
                        sb.Append("\n");
                        Response.Write(sb.ToString());
                        foreach (DataRow row in dsPic.Tables[0].Rows)
                        {
                            sb = new StringBuilder();
                            sb.Append(row["Name"].ToString() + "\t");
                            sb.Append(row["JueDingHao"].ToString() + "\t");
                            sb.Append(row["TuZhiBianHao"].ToString() + "\t");
                            sb.Append(row["ZhuanYeLeiBie"].ToString() + "\t");
                            sb.Append(row["ChuTuRiQi"].ToString() + "\t");
                            sb.Append(row["SheJiDanWei"].ToString() + "\t");
                            sb.Append(row["BanBen"].ToString() + "\t");
                            sb.Append("A" + row["TuFu"].ToString() + "\t");
                            sb.Append(row["Zhang"].ToString() + "张/套,共" + row["Tao"].ToString() + "套\t");
                            sb.Append(row["ShuLiang"].ToString() + "\t");
                            string zaiti = row["ZaiTi"].ToString().Trim();
                            zaiti = zaiti == "0" ? "纸质" : (zaiti == "1" ? "电子档" : zaiti == "2" ? "光盘" : "-");
                            sb.Append(zaiti + "\t");
                            string caizhi = row["CaiZhi"].ToString().Trim();
                            caizhi = caizhi == "0" ? "无" : (caizhi == "1" ? "蓝图" : (caizhi == "2" ? "白图" : "-"));
                            sb.Append(caizhi + "\t");
                            string miji = row["MiJi"].ToString();
                            miji = miji == "0" ? "公开" : (miji == "1" ? "限制" : (miji == "2" ? "秘密" : "-"));
                            sb.Append(miji + "\t");
                            string BaoGuanQiXian = row["BaoGuanQiXian"].ToString().Trim();
                            BaoGuanQiXian = BaoGuanQiXian == "0" ? "永久" : (BaoGuanQiXian == "1" ? "长期" : (BaoGuanQiXian == "2" ? "短期" : "-"));
                            sb.Append(BaoGuanQiXian + "\t");
                            string zhuangtai = row["ZhuangTai"].ToString();
                            zhuangtai = zhuangtai == "0" ? "无效" : "有效";
                            sb.Append(zhuangtai + "\t");
                            sb.Append(row["FaQiBuMen"].ToString() + "\t");
                            sb.Append(row["YiJiaoRen"].ToString() + "\t");
                            sb.Append(row["JiShouRen"].ToString() + "\t");
                            sb.Append(row["JiShouRiQi"].ToString() + "\t");
                            sb.Append(row["BeiZhu"].ToString() + "\t");
                            sb.Append("\n");
                            Response.Write(sb.ToString());
                        }
                    }
                    #endregion
                    /*End:[#24]*/
                    break;
                case "4":
                    #region
                    Response.AppendHeader("content-disposition", "attachment;filename=\"" + System.Web.HttpUtility.UrlEncode("管理类文件列表", System.Text.Encoding.UTF8) + ".xls\"");
                    using (DataSet dsFile = Databases.MocolaNet.Select(Moc_MFilesInfo.Moc_MFiles,
                   Moc_MFilesInfo.Moc_MFiles.ID,
                   Moc_MFilesInfo.Moc_MFiles.Name,
                   Moc_MFilesInfo.Moc_MFiles.JueDingHao,
                   Moc_MFilesInfo.Moc_MFiles.WenJianHao,
                   Moc_MFilesInfo.Moc_MFiles.ShenQingHao,
                   Moc_MFilesInfo.Moc_MFiles.FaWenDanWei,
                   Moc_MFilesInfo.Moc_MFiles.FaWenRiQi,
                   Moc_MFilesInfo.Moc_MFiles.ShuLiang,
                   Moc_MFilesInfo.Moc_MFiles.ZaiTi,
                   Moc_MFilesInfo.Moc_MFiles.CaiZhi,
                   Moc_MFilesInfo.Moc_MFiles.MiJi,
                   Moc_MFilesInfo.Moc_MFiles.BaoGuanQiXian,
                   Moc_MFilesInfo.Moc_MFiles.ZhuangTai,
                   Moc_MFilesInfo.Moc_MFiles.FaQiBuMen,
                   Moc_MFilesInfo.Moc_MFiles.YiJiaoRen,
                   Moc_MFilesInfo.Moc_MFiles.JieShouRen,
                   Moc_MFilesInfo.Moc_MFiles.JieShouRiQi,
                   Moc_MFilesInfo.Moc_MFiles.BeiZhu)
                   .Where((Moc_MFilesInfo.Moc_MFiles.Tid == Tid) && (Moc_MFilesInfo.Moc_MFiles.Eid == Eid))
                   .ToDataSet())
                    {

                        StringBuilder sb = new StringBuilder();
                        sb.Append("名称\t");
                        sb.Append("文件号\t");
                        sb.Append("申请号\t");
                        sb.Append("决定号\t");
                        sb.Append("发文日期\t");
                        sb.Append("发文单位\t");
                        sb.Append("数量\t");
                        sb.Append("载体\t");
                        sb.Append("材质\t");
                        sb.Append("密级\t");
                        sb.Append("保管期限\t");
                        sb.Append("状态\t");
                        sb.Append("发起部门\t");
                        sb.Append("移交人\t");
                        sb.Append("接受人\t");
                        sb.Append("接受日期\t");
                        sb.Append("备注\t");
                        sb.Append("\n");
                        Response.Write(sb.ToString());
                        foreach (DataRow row in dsFile.Tables[0].Rows)
                        {
                            sb = new StringBuilder();
                            sb.Append(row["Name"].ToString() + "\t");
                            sb.Append(row["WenJianHao"].ToString() + "\t");
                            sb.Append(row["ShenQingHao"].ToString() + "\t");
                            sb.Append(row["JueDingHao"].ToString() + "\t");
                            sb.Append(row["FaWenRiQi"].ToString() + "\t");
                            sb.Append(row["FaWenDanWei"].ToString() + "\t");
                            sb.Append(row["ShuLiang"].ToString() + "\t");
                            string zaiti = row["ZaiTi"].ToString().Trim();
                            zaiti = zaiti == "0" ? "纸质" : (zaiti == "1" ? "电子档" : zaiti == "2" ? "光盘" : "-");
                            sb.Append(zaiti + "\t");
                            string caizhi = row["CaiZhi"].ToString();
                            caizhi = caizhi == "0" ? "文档" : (caizhi == "1" ? "照片" : (caizhi == "2" ? "照证" : (caizhi == "3" ? "图片" : "-")));
                            sb.Append(caizhi + "\t");
                            string miji = row["MiJi"].ToString();
                            miji = miji == "0" ? "公开" : (miji == "1" ? "限制" : (miji == "2" ? "秘密" : "-"));
                            sb.Append(miji + "\t");
                            string BaoGuanQiXian = row["BaoGuanQiXian"].ToString().Trim();
                            BaoGuanQiXian = BaoGuanQiXian == "0" ? "永久" : (BaoGuanQiXian == "1" ? "长期" : (BaoGuanQiXian == "2" ? "短期" : "-"));
                            sb.Append(BaoGuanQiXian + "\t");
                            string zhuangtai = row["ZhuangTai"].ToString();
                            zhuangtai = zhuangtai == "0" ? "原件" : (zhuangtai == "1" ? "复印件" : (zhuangtai == "2" ? "电子档" : "-"));
                            sb.Append(zhuangtai + "\t");
                            sb.Append(row["FaQiBuMen"].ToString() + "\t");
                            sb.Append(row["YiJiaoRen"].ToString() + "\t");
                            sb.Append(row["JieShouRen"].ToString() + "\t");
                            sb.Append(row["JieShouRiQi"].ToString() + "\t");
                            sb.Append(row["BeiZhu"].ToString() + "\t");
                            sb.Append("\n");
                            Response.Write(sb.ToString());
                        }
                    }
                    #endregion
                    break;
            }
        }
        /* END: [#7]*/
    }
}
